package com.lf.api.schedule;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.PersistJobDataAfterExecution;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.lf.api.service.impl.DownloadVoiceServiceImpl;

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class DownloadAudioJob extends QuartzJobBean {
	private static Logger log = LoggerFactory.getLogger(DownloadAudioJob.class);
	@Autowired
	DownloadVoiceServiceImpl downloadVoiceService;
	
	protected void executeInternal(JobExecutionContext ctx)
			throws JobExecutionException {
		log.info("begin download medie...");
		downloadVoiceService.downloadSubjectVoice();
		log.info("end download medie.");
	}

}